<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2021/11/21
 * Time: 9:32
 */
namespace phpfuntions\mp_file;
class myphp_stream
{
//PHP中的Stream  函数　256

    /**
     * stream_bucket_append  函数：为队列添加数据　
     * @access public
     * @return
     */
    public static function stream_bucket_append ($brigade, $bucket) {
        return stream_bucket_append($brigade, $bucket );

    }
    /**
     * stream_bucket_make_writeable  函数：从操作的队列中返回一个数据对象　

     * @access public
     * @return
     */
    public static function stream_bucket_make_writeable ($brigade) {
        return stream_bucket_make_writeable( $brigade);

    }

    /**
     * stream_bucket_new  函数：为当前队列创建一个新的数据　
     * @access public
     * @return
     */
    public static function stream_bucket_new ($stream, $buffer) {
        return stream_bucket_new($stream, $buffer );

    }

    /**
     * stream_bucket_prepend  函数：预备数据到队列　
     * @access public
     * @return
     */
    public static function stream_bucket_prepend ($brigade, $bucket) {
        return stream_bucket_prepend($brigade, $bucket );

    }

    /**
     * stream_context_create  函数：创建数据流上下文　　
     * @access public
     * @return
     */
    public static function stream_context_create (array $options = null, array $params = null) {
        return stream_context_create( $options ,  $params);

    }

    /**
     * stream_context_get_default  函数：获取默认的数据流上下文　
     * @access public
     * @return
     */
    public static function stream_context_get_default (array $options = null) {
        return stream_context_get_default( $options  );

    }
    /**
     * stream_context_get_options  函数：获取数据流的设置　
     * @access public
     * @return
     */
    public static function stream_context_get_options ($stream_or_context) {
        return stream_context_get_options($stream_or_context );

    }

    /**
     * stream_context_set_option  函数：对数据流、数据包或者上下文进行设置　　
     * @access public
     * @return
     */
    public static function stream_context_set_option ($stream_or_context, $wrapper, $option, $value) {
        return stream_context_set_option($stream_or_context, $wrapper, $option, $value );

    }

    /**
     * stream_context_set_params  函数：为数据流、数据包或者上下文设置参数　
     * @access public
     * @return
     */
    public static function stream_context_set_params ($stream_or_context, array $params) {
        return stream_context_set_params($stream_or_context,  $params );

    }

    /**
     * stream_copy_to_stream  函数：在数据流之间进行复制操作
     * @access public
     * @return
     */
    public static function stream_copy_to_stream ($source, $dest, $maxlength = null, $offset = null) {
        return stream_copy_to_stream($source, $dest, $maxlength  , $offset  );

    }

    /**
     * stream_filter_append  函数：为数据流添加过滤器　　
     * @access public
     * @return
     */
    public static function stream_filter_append ($stream, $filtername, $read_write = null, $params = null) {
        return stream_filter_append($stream, $filtername, $read_write, $params );

    }

    /**
     * stream_filter_prepend  函数：为数据流预备添加过滤器　　
     * @access public
     * @return
     */
    public static function stream_filter_prepend ($stream, $filtername, $read_write = null, $params = null) {
        return stream_filter_prepend( $stream, $filtername, $read_write , $params);

    }

    /**
     * stream_filter_register  函数：注册一个数据流的过滤器并作为PHP类执行　
     * @access public
     * @return
     */
    public static function stream_filter_register ($filtername, $classname) {
        return stream_filter_register( $filtername, $classname);

    }

    /**
     * stream_filter_remove  函数：从一个数据流中移除过滤器　　
     * @access public
     * @return
     */
    public static function stream_filter_remove ($stream_filter) {
        return stream_filter_remove( $stream_filter);

    }

    /**
     * stream_get_contents  函数：读取数据流中的剩余数据到字符串　
     * @access public
     * @return
     */
    public static function stream_get_contents ($handle, $maxlength = null, $offset = null) {
        return stream_get_contents( $handle, $maxlength , $offset);

    }

    /**
     * stream_get_filters  函数：返回已经注册的数据流过滤器列表
     * @access public
     * @return
     */
    public static function stream_get_filters () {
        return stream_get_filters( );

    }

    /**
     * stream_get_line  函数：按照给定的定界符从数据流资源中获取行　　
     * @access public
     * @return
     */
    public static function stream_get_line () {
        return stream_get_line( );

    }

    /**
     * stream_get_meta_data  函数：从封装协议文件指针中获取报头/元数据　
     * @access public
     * @return
     */
    public static function stream_get_meta_data ($stream) {
        return stream_get_meta_data( $stream);

    }

    /**
     * stream_get_transports  函数：返回注册的Socket传输列表　
     * @access public
     * @return
     */
    public static function stream_get_transports () {
        return stream_get_transports( );

    }
    /**
     * stream_register_wrapper  函数：注册一个用PHP类实现的URL封装协议
     * @access public
     * @return
     */
    public static function stream_register_wrapper ($protocol, $classname, $flags) {
        return stream_register_wrapper( $protocol, $classname, $flags);

    }
    /**
     * stream_select  函数：接收数据流数组并等待它们状态的改变
     * @access public
     * @return
     */
    public static function stream_select (array &$read, array &$write, array &$except, $tv_sec, $tv_usec = null) {
        return stream_select( $read,  $write, $except, $tv_sec, $tv_usec );

    }
    /**
     * stream_set_blocking  函数：将一个数据流设置为堵塞或者非堵塞状态
     * @access public
     * @return
     */
    public static function stream_set_blocking ($stream, $mode) {
        return stream_set_blocking($stream, $mode );

    }
    /**
     * stream_set_timeout  函数：对数据流进行超时设置　
     * @access public
     * @return
     */
    public static function stream_set_timeout ($stream, $seconds, $microseconds = null) {
        return stream_set_timeout($stream, $seconds, $microseconds );

    }

    /**
     * stream_set_write_buffer  函数：为数据流设置缓冲区　
     * @access public
     * @return
     */
    public static function stream_set_write_buffer () {
        return stream_set_write_buffer( );

    }

    /**
     * stream_socket_accept  函数：接受由  函数stream_ socket_server()创建的Socket连接　
     * @access public
     * @return
     */
    public static function stream_socket_accept ($stream, $buffer) {
        return stream_socket_accept($stream, $buffer );

    }
    /**
     * stream_socket_client  函数：打开网络或者UNIX主机的Socket连接
     * @access public
     * @return
     */
    public static function stream_socket_client ($remote_socket, &$errno = null, &$errstr = null, $timeout = null, $flags = null, $context = null) {
        return stream_socket_client($remote_socket, $errno , $errstr , $timeout, $flags , $context  );

    }

    /**
     * stream_socket_enable_crypto  函数：为一个已经连接的Socket打开或者关闭数据加密　
     * @access public
     * @return
     */
    public static function stream_socket_enable_crypto ($stream, $enable, $crypto_type = null, $session_stream = null) {
        return stream_socket_enable_crypto( $stream, $enable, $crypto_type , $session_stream );

    }

    /**
     * stream_socket_get_name  函数：获取本地或者网络Socket的名称　
     * @access public
     * @return
     */
    public static function stream_socket_get_name () {
        return stream_socket_get_name( );

    }

    /**
     * stream_socket_pair  函数：创建两个无区别的Socket数据流连接　　
     * @access public
     * @return
     */
    public static function stream_socket_pair ($handle, $want_peer) {
        return stream_socket_pair( $handle, $want_peer);

    }
    /**
     * stream_socket_recvfrom  函数：从Socket获取数据，不管其连接与否
     * @access public
     * @return
     */
    public static function stream_socket_recvfrom ($socket, $length, $flags = null, &$address = null) {
        return stream_socket_recvfrom($socket, $length, $flags, $address );

    }

    /**
     * stream_socket_sendto  函数：向Socket发送数据，不管其连接与否　　
     * @access public
     * @return
     */
    public static function stream_socket_sendto ($socket, $data, $flags = null, $address = null) {
        return stream_socket_sendto($socket, $data, $flags , $address  );

    }

    /**
     * stream_socket_server  函数：创建一个网络或者UNIX Socket服务端　
     * @access public
     * @return
     */
    public static function stream_socket_server ($local_socket, &$errno = null, &$errstr = null, $flags = null, $context = null) {
        return stream_socket_server($local_socket, $errno , $errstr , $flags , $context  );

    }

    /**
     * stream_wrapper_restore  函数：恢复一个事先注销的数据包　
     * @access public
     * @return
     */
    public static function stream_wrapper_restore ($protocol) {
        return stream_wrapper_restore($protocol );

    }

    /**
     * stream_wrapper_unregister  函数：注销一个URL地址包　　
     * @access public
     * @return
     */
    public static function stream_wrapper_unregister ($protocol) {
        return stream_wrapper_unregister( $protocol);

    }
}